package com.rc.object;

import com.rc.activity.dao.tbl_Item;

public class ItemsObj {

	public static String[] keys = { "ItemID", "CategoryID", "Name", "Amount",
			"CategorizeStatus", "Memo", "TripID", "ReceiptID", "UserID" };

	public static String ITEM_ID = keys[0];
	public static String CATEGORY_ID = keys[1];
	public static String NAME = keys[2];
	public static String AMOUNT = keys[3];
	public static String CATEGORIZE_STATUS = keys[4];
	public static String MEMO = keys[5];
	public static String TRIP_ID = keys[6];
	public static String RECEIPT_ID = keys[7];
	public static String USER_ID = keys[8];

	public static tbl_Item getObjItemByBaseObject(BaseObject baseObj) {
		if (baseObj == null) {
			return null;
		}
		return new tbl_Item(baseObj.getParamLong(ITEM_ID),
				baseObj.getParamLong(RECEIPT_ID),
				baseObj.getParamLong(CATEGORY_ID),
				baseObj.getParamLong(TRIP_ID), baseObj.getParam(NAME),
				baseObj.getParam(AMOUNT),
				baseObj.getParamInt(CATEGORIZE_STATUS), 0,
				baseObj.getParam(MEMO), "", "", "", false,
				baseObj.getParam(USER_ID), "");
	}
}
